package com.zqu.service.impl;

import com.zqu.mapper.ModuleMapper;
import com.zqu.pojo.Module;
import com.zqu.service.ModuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ModuleServiceImpl implements ModuleService {
    @Autowired(required = false)
    private ModuleMapper moduleMapper;

    @Override
    public Module selectModuleById(long id) {
        return moduleMapper.selectTById(id);
    }

    @Override
    public List<Module> selectList(Module module) {
        return moduleMapper.selectList(module);
    }

    @Override
    public boolean insertModule(Module module) {
        return moduleMapper.insertT(module)>0;
    }

    @Override
    public boolean updateModule(Module module) {
        return moduleMapper.updateT(module)>0;
    }

    @Override
    public boolean deleteModule(long id) {
        return moduleMapper.deleteT(id)>0;
    }

    @Override
    public boolean deleteModuleByIds(String[] ids) {
        return moduleMapper.deleteTByIds(ids)>0;
    }
}
